<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.7.10/dist/vue.js"></script>
</head>
<body>
  <div id="app">
    <!-- 可以执行一些简单的逻辑操作(访问到vm上的属性和方法,执行一些运算符的操作) -->
    <!-- 插值语法是直接访问 vm 上的属性和方法 -->
    <button @click="count++">点击累加+1</button>
    <button @click="count+=3">点击累加N</button>
    <button @click="fn">点击</button>
    <p>{{count}}</p>
  </div>
  <script>
    const vm = new Vue({
      el: "#app",
      data() {
        return {
          count:0
        };
      },
      methods:{
        fn(){
            console.log(this);
        }
      }
    });
  </script>
</body>

</html>